package tdd.performancebill.application;

import java.util.ArrayList;
import java.util.List;

/**
 * 如果Service和Controller都用到，应该从架构考虑，展示（Presentation）层依赖于应用层（Application）
 * 不稳定的层依赖于稳定的层
 */
public class PerformanceSummary {
    private String customer;
    List<Performance> performances = new ArrayList<>();

    public PerformanceSummary() {}

    public PerformanceSummary(String customer) {
        this.customer = customer;
    }

    public String getCustomer() {
        return customer;
    }

    public List<Performance> getPerformances() {
        return performances;
    }

    public void addPerformance(String playId, int audience) {
        Performance p = new Performance(playId, audience);
        performances.add(p);
    }
}
